using System.ComponentModel.DataAnnotations;

namespace Hospital.Domain
{
    /// <summary>
    /// 院区表
    /// </summary>
    public class HospitalBranch
    {
        /// <summary>
        /// 院区ID
        /// </summary>
        [Key]
        public int Id { get; set; }

        /// <summary>
        /// 院区名称
        /// </summary>
        [Required]
        [MaxLength(100)]
        public string Name { get; set; } = string.Empty;

        /// <summary>
        /// 地址
        /// </summary>
        [Required]
        [MaxLength(200)]
        public string Address { get; set; } = string.Empty;

        /// <summary>
        /// 联系电话
        /// </summary>
        [MaxLength(20)]
        public string? Phone { get; set; }

        /// <summary>
        /// 是否启用
        /// </summary>
        public bool IsEnabled { get; set; } = true;

        /// <summary>
        /// 排序顺序
        /// </summary>
        public int SortOrder { get; set; }

        /// <summary>
        /// 删除标记
        /// </summary>
        public bool IsDeleted { get; set; } = false;

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreatedTime { get; set; } = DateTime.Now;

        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime? UpdatedTime { get; set; }

        /// <summary>
        /// 导航属性：开单记录
        /// </summary>
        public virtual ICollection<OrderRecord> OrderRecords { get; set; } = new List<OrderRecord>();
    }
} 